﻿Ext.define("entgpv11.store.ListVideo", {
    extend: "Ext.data.Store",
    requires: [
        'Ext.data.proxy.LocalStorage'
    ],
    config: {
        model: "entgpv11.model.ListVideo",
        proxy: {
				type:"ajax",
				url: Ext.APP_GLOBAL.getServiceUrl() + "GetHtmlVideos",
				scriptTag: true,
                actionMethods:
				{
					read: 'POST'
				},
				extraParams:{
							id:0
				},
                reader: {
				  type: 'json',
				  rootProperty:'videos'
			    }
		},
        autoLoad: false,
        //filter the data using the firstName field
        sorters: 'name',
		grouper: {
            sortProperty: "name",
            direction: "DESC",
            groupFn: function(record) {
                    return record.get('name')[0];
            }
        }
    }
});
